/*
 * @Author: wuhao930406 1148547900@qq.com
 * @Date: 2023-07-21 10:52:38
 * @LastEditors: wuhao930406 1148547900@qq.com
 * @LastEditTime: 2023-08-08 17:04:05
 * @FilePath: /legion-iot/src/pages/dashboard3d/components/cast/model.jsx
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 */
import React, { useEffect } from "react";
import {
  OrbitControls,
  Environment,
  useGLTF,
  Box,
  Gltf,
  RoundedBox,
  Text,
} from "@react-three/drei";
export default function Model(props) {
  const { nodes, materials } = useGLTF("./model.glb");

  
  return (
    <group {...props} dispose={null} scale={0.07}>
      <OrbitControls></OrbitControls>
      <group
        position={[-3.403, -25, 2.593]}
        rotation={[0.007, 0, 0]}
        scale={1}
      >
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_1.geometry}
          material={materials.material_0}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_2.geometry}
          material={materials.material_1}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_3.geometry}
          material={materials.material_2}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_4.geometry}
          material={materials.material_3}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_5.geometry}
          material={materials.material_4}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_6.geometry}
          material={materials.material_5}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_7.geometry}
          material={materials.material_6}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_8.geometry}
          material={materials.material_7}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_9.geometry}
          material={materials.material_8}
        />
        <mesh
          castShadow
          receiveShadow
          geometry={nodes.building_10.geometry}
          material={materials.material_9}
        />
      </group>
    </group>
  );
}

useGLTF.preload("./model.glb");